AmbientOcclusionConfiguration
Configuration for an ambient occlusion.
Constructors
Properties
Change the quality of ambient occlusion in the scene. Greater quality means less noise, but worse performance.
Controls the radius/size of the ambient occlusion in world units. Should be set to how far you want the occlusion to extend from a given object. Set it too low, and AO becomes an edge detector. Too high, and the AO becomes "soft" and might not highlight the details you want.
Use half-resolution" mode for performance-critical applications. This will cause the AO to be calculated at half the resolution of the screen, and then upscaled to the full resolution. This is a great way to get a performance boost (generally 2x-4x) at the cost of some quality (the AO will lack fine details and temporal stability will be slightly reduced).
It is recommended to not change this value, otherwise rendering issues may occur.
The color of the ambient occlusion. Recommended in scenes where bounced light has a uniform "color", for instance a scene that is predominantly lit by a blue sky. The color is expected to be in the sRGB color space, and is automatically converted to linear space for you. Keep the color pretty dark for sensible results.
The half aoResolution
mode uses depth-aware upscaling by default. The AO effect looks bad without depth-aware upscaling, so it is not recommended to disable it. However, if performance is truly that critical, you can do so by setting depthAwareUpsampling
to false.
Should be automatically set to the correct value. If you are getting washed out colors, try setting gammaCorrection
to false, and if you are getting dark colors, try setting it to true.
A purely artistic control for the intensity of the AO has the effect of darkening areas with more ambient occlusion. Useful to make the effect more pronounced. An intensity of 2 generally produces soft ambient occlusion that isn't too noticeable, whereas one of 5 produces heavily prominent ambient occlusion.
When screenSpaceRadius is set to true, the aoRadius
parameter represents the size of the ambient occlusion effect in pixels (recommended to be set between 16 and 64).